------------------------------------------------------------------------------------------------------------------------------------
      name:  plog_918
       log:  /accounts/projects/jr_ra/GRscarring/erratum/programs/analysis/fig_atcfx_age.log
  log type:  text
 opened on:  27 Nov 2024, 18:06:01

. ***************************************************************************************************************
. * fig_atcfx_age.do
. *
. * Make plot of age effects from A-T-C decomposition
. * Based on fig_atcfx.do, 1/21/2020
. *
. 
. 
. ***************************************************************************************************************  
. clear

. cap project, doinfo

. //cap notaproject
. if _rc==0 {
.         local pdir "`r(pdir)'"                                                      // the project's main dir.
.         local dofile "`r(dofile)'"                                                  // do-file's stub name
.         local sig {bind:{hi:[`dofile'.dta. RP : `dofile'.do, `c(current_date)']}}       // a signature in notes
.         local doasproject=1
. }

. else {
.         local pdir "~/GRscarring"
.         local dofile "fig_atcfx_age"
.         local doasproject=0
. }

. 
. set more off

. local rootdir "`pdir'"

. local thisdir "`pdir'"

. 
. local scratch "`pdir'/scratch"

. local rawdata "`pdir'/rawdata"

. local output "`pdir'/results"

. 
. set scheme s1color

. 
. if `doasproject'==1 {
.         project, uses(`scratch'/recessionlist.dta)
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/recessionlist.dta" filesig(1425014852:1
> 5851)
.         project, uses(`scratch'/extrapolate_coeffs.dta)
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/extrapolate_coeffs.dta" filesig(3506803
> 25:2415967)
. }

. 
. local depvars "empl rw_l log_pearnval_tc_r"

. 
.         *Get age effects from the basic A-T-C decomposition (model B - not extrapolated).
.         use if inlist(model, "mB1b") using `scratch'/runatc_coeffs, clear

.         keep if ivartype=="FV" & fvname=="exper" 
(428 observations deleted)

.         gen age=fvval+22

.         gen keep="A"

.         foreach v in `depvars' {
  2.           replace keep="B" if depvar=="`v'"
  3.         }
(19 real changes made)
(19 real changes made)
(19 real changes made)

.         keep if keep=="B"
(0 observations deleted)

.         drop keep

. 
.         tempfile base

.         save `base', replace
(file /tmp/St2868349.000004 not found)
file /tmp/St2868349.000004 saved as .dta format

. 
.         replace b=b*100 if depvar=="empl"
(18 real changes made)

.         gen zero=0

. 
.         twoway line b age if depvar=="empl" & model=="mB1b", yaxis(1) lstyle(p1) || ///
>            line zero age if model=="mB1b" & depvar=="empl", lpattern(dot) lcolor(black) || ///
>                         , legend(off) ///
>                         ytitle("Employment rate in % (age 32=0)") xtitle("Age") ///
>                     legend(off) xlabel(22 25 30 35 40) ///
>                         title("Age effects on employment" "from age-time-cohort decomposition") ///
>                         saving("`output'/`dofile'.gph", replace)   
file /accounts/projects/jr_ra/GRscarring/erratum/results/fig_atcfx_age.gph saved

. 
.  if `doasproject'==1 project, creates(`output'/`dofile'.gph)
project GRscar_erratum > do-file creates: "results/fig_atcfx_age.gph" filesig(4291201311:8043)

.  
. 
end of do-file
      name:  plog_918
       log:  /accounts/projects/jr_ra/GRscarring/erratum/programs/analysis/fig_atcfx_age.log
  log type:  text
 closed on:  27 Nov 2024, 18:06:02
------------------------------------------------------------------------------------------------------------------------------------
